cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)

project(lmedia)

add_subdirectory(taglib)

include_directories(
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/taglib
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/taglib/toolkit
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/taglib/ape
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/taglib/mpeg
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/taglib/mpeg/id3v1
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/taglib/mpeg/id3v2
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/taglib/mpeg/id3v2/frames
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/taglib/ogg
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/taglib/ogg/vorbis
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/taglib/flac
        ${CMAKE_CURRENT_SOURCE_DIR}/taglib/bindings/c/
)

add_library(
        taglib SHARED
        taglibWrapper.cpp
)

find_library(log-lib log)
target_link_libraries(taglib tag ${log-lib})